<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Emr\V20190103\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeClusterFlowStatusDetail response structure.
 *
 * @method array getStageDetails() Obtain Task step details

Note: This field may return null, indicating that no valid values can be obtained.
 * @method void setStageDetails(array $StageDetails) Set Task step details

Note: This field may return null, indicating that no valid values can be obtained.
 * @method array getFlowDesc() Obtain Task parameters.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method void setFlowDesc(array $FlowDesc) Set Task parameters.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method string getFlowName() Obtain Task name.
 * @method void setFlowName(string $FlowName) Set Task name.
 * @method float getFlowTotalProgress() Obtain Overall task flow progress.
Example: 0.8.
 * @method void setFlowTotalProgress(float $FlowTotalProgress) Set Overall task flow progress.
Example: 0.8.
 * @method integer getFlowTotalStatus() Obtain Overall process status definition.
0: initializing.
1: running.
2: completed.
3: completed (with skipped steps).
-1: failed.
-3: blocked.
 * @method void setFlowTotalStatus(integer $FlowTotalStatus) Set Overall process status definition.
0: initializing.
1: running.
2: completed.
3: completed (with skipped steps).
-1: failed.
-3: blocked.
 * @method array getFlowExtraDetail() Obtain Additional process information.
This parameter is returned when NeedExtraDetail is true.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method void setFlowExtraDetail(array $FlowExtraDetail) Set Additional process information.
This parameter is returned when NeedExtraDetail is true.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method string getFlowInfo() Obtain Flow description.
 * @method void setFlowInfo(string $FlowInfo) Set Flow description.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeClusterFlowStatusDetailResponse extends AbstractModel
{
    /**
     * @var array Task step details

Note: This field may return null, indicating that no valid values can be obtained.
     */
    public $StageDetails;

    /**
     * @var array Task parameters.
Note: This field may return null, indicating that no valid values can be obtained.
     */
    public $FlowDesc;

    /**
     * @var string Task name.
     */
    public $FlowName;

    /**
     * @var float Overall task flow progress.
Example: 0.8.
     */
    public $FlowTotalProgress;

    /**
     * @var integer Overall process status definition.
0: initializing.
1: running.
2: completed.
3: completed (with skipped steps).
-1: failed.
-3: blocked.
     */
    public $FlowTotalStatus;

    /**
     * @var array Additional process information.
This parameter is returned when NeedExtraDetail is true.
Note: This field may return null, indicating that no valid values can be obtained.
     */
    public $FlowExtraDetail;

    /**
     * @var string Flow description.
     */
    public $FlowInfo;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param array $StageDetails Task step details

Note: This field may return null, indicating that no valid values can be obtained.
     * @param array $FlowDesc Task parameters.
Note: This field may return null, indicating that no valid values can be obtained.
     * @param string $FlowName Task name.
     * @param float $FlowTotalProgress Overall task flow progress.
Example: 0.8.
     * @param integer $FlowTotalStatus Overall process status definition.
0: initializing.
1: running.
2: completed.
3: completed (with skipped steps).
-1: failed.
-3: blocked.
     * @param array $FlowExtraDetail Additional process information.
This parameter is returned when NeedExtraDetail is true.
Note: This field may return null, indicating that no valid values can be obtained.
     * @param string $FlowInfo Flow description.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("StageDetails",$param) and $param["StageDetails"] !== null) {
            $this->StageDetails = [];
            foreach ($param["StageDetails"] as $key => $value){
                $obj = new StageInfoDetail();
                $obj->deserialize($value);
                array_push($this->StageDetails, $obj);
            }
        }

        if (array_key_exists("FlowDesc",$param) and $param["FlowDesc"] !== null) {
            $this->FlowDesc = [];
            foreach ($param["FlowDesc"] as $key => $value){
                $obj = new FlowParamsDesc();
                $obj->deserialize($value);
                array_push($this->FlowDesc, $obj);
            }
        }

        if (array_key_exists("FlowName",$param) and $param["FlowName"] !== null) {
            $this->FlowName = $param["FlowName"];
        }

        if (array_key_exists("FlowTotalProgress",$param) and $param["FlowTotalProgress"] !== null) {
            $this->FlowTotalProgress = $param["FlowTotalProgress"];
        }

        if (array_key_exists("FlowTotalStatus",$param) and $param["FlowTotalStatus"] !== null) {
            $this->FlowTotalStatus = $param["FlowTotalStatus"];
        }

        if (array_key_exists("FlowExtraDetail",$param) and $param["FlowExtraDetail"] !== null) {
            $this->FlowExtraDetail = [];
            foreach ($param["FlowExtraDetail"] as $key => $value){
                $obj = new FlowExtraDetail();
                $obj->deserialize($value);
                array_push($this->FlowExtraDetail, $obj);
            }
        }

        if (array_key_exists("FlowInfo",$param) and $param["FlowInfo"] !== null) {
            $this->FlowInfo = $param["FlowInfo"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
